cd $tmpdir

# Downloading php7 source
if [ ! -f "$sqlite" ]; then
	echo "Downloading sqlite sources..."
	wget $sqlitemirror/$sqlite
	tar -xf $sqlite
fi

cd $sqlitesrcdir

# Compile
./configure --prefix=$freondir            \
			--disable-static              \
		CFLAGS="-g -O2                    \
		-DSQLITE_ENABLE_FTS3=1            \
		-DSQLITE_ENABLE_FTS4=1            \
		-DSQLITE_ENABLE_COLUMN_METADATA=1 \
		-DSQLITE_ENABLE_UNLOCK_NOTIFY=1   \
		-DSQLITE_ENABLE_DBSTAT_VTAB=1     \
		-DSQLITE_SECURE_DELETE=1          \
		-DSQLITE_ENABLE_FTS3_TOKENIZER=1" &&

make

make install

cd $tmpdir
